#include <stdio.h>

int main(int argc, char **argv)
{
    int ch;
    FILE *fp;
    if (argc < 2) {
        fp = stdin;
    } else {
        fp = fopen(argv[1], "rb");
    }
    if (!fp) {
        printf("Open [%s] Error!\n", argv[1]);
        return 1;
    }
    setbuf(fp, NULL);
    setbuf(stdout, NULL);
    while((ch = fgetc(fp)) != EOF)
    {
        putchar(ch);
    }
    fclose(fp);
    return 0;
}
